package HLLibClasses;

import HLCode.HLClassManager;
import HLCode.HLLibClass;
import HLCode.HLObject;
import HLLib.base.HLGraphics;
import HLLib.userControl.HLBBS;

public class HLClassBBS extends HLLibClass {
    public HLClassBBS(HLClassManager owner) {
        super(owner);
    }

    public HLObject NewObject() {
        return new HLBBS();
    }

    public void Execute(HLObject self, int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            ((HLBBS) self).Logic();
            break;
        }
        case 1: {
            ((HLBBS) self).Render((HLGraphics)args.GetObject(0));
            break;
        }
        case 2: {
            ((HLBBS) self).Load();
            break;
        }
        case 3: {
            ((HLBBS) self).sGetOneGroup(args.GetInt(0), args.GetInt(1));
            break;
        }
        case 4: {
            ((HLBBS) self).LoadOver();
            break;
        }
        case 5: {
            ((HLBBS) self).sJoinGroup(args.GetInt(0));
            break;
        }
        case 6: {
            ((HLBBS) self).sExitGroup(args.GetInt(0));
            break;
        }
        }
    }

    public void StaticExecute(int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            if (resultOwnerObject == null) {
                HLBBS.GetBBS(args.GetInt(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, HLBBS.GetBBS(args.GetInt(0)));
            }
            break;
        }
        }
    }
}
